// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_INV_DISPATCH_ITEM
// * CreateDate    : 2011/8/16 10:16:40
// * Creater       : CodeSmith
// * LastChangeDate: 2011/8/16 10:16:40
// * LastChanger   : 2011/8/16 10:16:40
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
	[Serializable]
	public partial class InvDispatchItemEntity : EntityBase
    {
        public InvDispatchItemTable TableSchema
        {
            get
            {
                return InvDispatchItemTable.Current;
            }
		}
		
		public InvDispatchItemEntity()
        {

        }
		
		public InvDispatchItemEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.DispatchItemId = Convert.ToString(CommonFunctions.ToObject(dr["DISPATCH_ITEM_ID"]));
			this.DispatchOrderId = Convert.ToString(CommonFunctions.ToObject(dr["DISPATCH_ORDER_ID"]));
			this.ProductId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_ID"]));
			this.Qty = Convert.ToDecimal(CommonFunctions.ToObject(dr["QTY"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
            this.LocationId = Convert.ToString(CommonFunctions.ToObject(dr["LOCATION_ID"]));
        }
		
		public InvDispatchItemEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.DispatchItemId = Convert.ToString(CommonFunctions.ToObject(dr["DISPATCH_ITEM_ID"]));
			this.DispatchOrderId = Convert.ToString(CommonFunctions.ToObject(dr["DISPATCH_ORDER_ID"]));
			this.ProductId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_ID"]));
			this.Qty = Convert.ToDecimal(CommonFunctions.ToObject(dr["QTY"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
            this.LocationId = Convert.ToString(CommonFunctions.ToObject(dr["LOCATION_ID"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return InvDispatchItemTable.Current;
            }
        }
		
		#region Perporty List
        public string DispatchItemId
        {
            get { return Convert.ToString(GetData(InvDispatchItemTable.C_DISPATCH_ITEM_ID)); }
            set { SetData(InvDispatchItemTable.C_DISPATCH_ITEM_ID, value); }
        }
		
        public string DispatchOrderId
        {
            get { return Convert.ToString(GetData(InvDispatchItemTable.C_DISPATCH_ORDER_ID)); }
            set { SetData(InvDispatchItemTable.C_DISPATCH_ORDER_ID, value); }
        }
		
        public string ProductId
        {
            get { return Convert.ToString(GetData(InvDispatchItemTable.C_PRODUCT_ID)); }
            set { SetData(InvDispatchItemTable.C_PRODUCT_ID, value); }
        }
        public string LocationId
        {
            get { return Convert.ToString(GetData(InvDispatchItemTable.C_LOCATION_ID)); }
            set { SetData(InvDispatchItemTable.C_LOCATION_ID, value); }
        }
        public decimal Qty
        {
            get { return Convert.ToDecimal(GetData(InvDispatchItemTable.C_QTY)); }
            set { SetData(InvDispatchItemTable.C_QTY, value); }
        }
		
        public string Remark
        {
            get { return Convert.ToString(GetData(InvDispatchItemTable.C_REMARK)); }
            set { SetData(InvDispatchItemTable.C_REMARK, value); }
        }
		
		#endregion
	}
	
	
}	

